package com.game.android.portalasteroid;

import android.app.*;
import android.content.*;
import android.os.*;
import android.preference.*;
import android.widget.*;

public class Highscore extends Activity {
	
    int overallScore;
    int consecutiveScore;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.highscore);
		
		getHighscores();
	}
	
	/** Get the high scores of the user. */
    private void getHighscores() {
        SharedPreferences app_preferences = PreferenceManager.getDefaultSharedPreferences(this);
        
        overallScore = app_preferences.getInt("highscore_overall", 0);
        consecutiveScore = app_preferences.getInt("highscore_consecutive", 0);
        
        TextView overall = (TextView) findViewById(R.id.highscore_overall);
        overall.append("Overall High score: " + overallScore);
        
        TextView consecutive = (TextView) findViewById(R.id.highscore_consecutive);
        consecutive.append("Consecutive High score: " + consecutiveScore);
    }
}